package org.lds.scheduled.job.admin.business.worker.model.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;
import org.lds.scheduled.job.common.model.db.PageCondition;

import java.io.Serializable;

/**
 * 分页 - 请求
 *
 * @author lidongsheng
 * @since 2025-01-16
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class WorkerBaseListPageRequest extends PageCondition implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    private Long id;

    /**
     * 大于ID
     */
    private Long gtId;

    /**
     * 应用ID
     */
    private Long appId;

    /**
     * IP
     */
    private String ip;

    public void setIp(String ip) {
        this.ip = StringUtils.trimToNull(ip);
    }

    /**
     * 端口
     */
    private Integer port;

    /**
     * 状态
     */
    private Boolean enable;
}
